import matplotlib.pyplot as plt

# 读取图像文件，下载地址：https://static.jyshare.com/images/demo/map.jpeg
img = plt.imread('map.jpeg')

# 显示图像
plt.imshow(img)
plt.show()


import matplotlib.pyplot as plt

plt.rcParams['font.family'] = 'Heiti TC'  # 替换为你选择的字体

# 创建数据
x = [1, 2, 3, 4, 5]
y = [2, 4, 6, 8, 10]

# 绘制折线图
plt.plot(x, y)

# 添加标题和标签
plt.title('折线图示例')
plt.xlabel('X轴')
plt.ylabel('Y轴')

# 显示图形
plt.show()


import seaborn as sns

# 设置主题和颜色调色板
sns.set_theme(style="whitegrid", palette="pastel")









import seaborn as sns
import matplotlib.pyplot as plt

# 设置主题和颜色调色板
sns.set_theme(style="darkgrid", palette="pastel")
# 示例数据
products = ["Product A", "Product B", "Product C", "Product D"]
sales = [120, 210, 150, 180]

# 创建柱状图
sns.barplot(x=products, y=sales)

# 添加标签和标题
plt.xlabel("Products")
plt.ylabel("Sales")
plt.title("Product Sales by Category")

# 显示图表
plt.show()